export default class Column extends Laya.Script {

    constructor() { 
        super(); 
        this.canAddScore=true;
        // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    }
    onUpdate(){
        if(this.owner.x<-255){
            this.owner.removeSelf();
            Laya.Pool.recover("Column",this.owner);
        }
        if(this.canAddScore&&this.owner.x<=323){
            this.canAddScore=false;
            Laya.stage.event("AddScore");
            Laya.SoundManager.playSound("res/Audio/defeng.wav");
        }
    }
}